package com.jmpt.fangbohui.ui.holder;

import android.content.Context;
import android.view.View;
import android.widget.TextView;

import com.jmpt.fangbohui.R;
import com.jmpt.fangbohui.bean.NewHouseDetailBean.Room;
import com.jmpt.fangbohui.ui.base.BaseViewHolder;
import com.lidroid.xutils.ViewUtils;
import com.lidroid.xutils.view.annotation.ViewInject;

public class RoomItemHolder extends BaseViewHolder<Room> {
	
	@ViewInject(R.id.tv_room_number)
	private TextView tv_room_number;
	
	@ViewInject(R.id.tv_room_type)
	private TextView tv_room_type;
	
	@ViewInject(R.id.tv_room_area)
	private TextView tv_room_area;
	
	@ViewInject(R.id.tv_room_price)
	private TextView tv_room_price;
	
	@ViewInject(R.id.tv_room_discount)
	private TextView tv_room_discount;
	
	@ViewInject(R.id.tv_room_status)
	private TextView tv_room_status;

	public RoomItemHolder(Context context) {
		super(context);
	}

	@Override
	protected View initView() {
		View view = View.inflate(mContext, R.layout.rooms_item_layout, null);
		 
		ViewUtils.inject(this, view);
		
		return view;
	}

	@Override
	protected void refreshView(Room room) {
		tv_room_number.setText(room.getBuilds_name());
		tv_room_type.setText(room.getHouse_type());
		tv_room_area.setText(room.getArea());
		tv_room_price.setText(room.getDis_price());
		tv_room_discount.setText(room.getDiscount());
		tv_room_status.setText(room.getRooms_status());
	}

}
